clear;clc;

SOLUTION_LowElastTN =   load("SOLUTION.mat",'SOLUTION_Main').SOLUTION_Main;

TempList    =   {SOLUTION_LowElastTN,};
LabelList   =   {'LowElastTN',};
TempNum     =   length(TempList);
Tables      =   cell(TempNum,1);

parfor ii=1:TempNum
    vv          =   TempList{ii};
    Tables{ii}  =   SubFun_CollectResults(vv);
end

FileName    =   'TableGraphs\\KeyResults.xlsx';
ShockList   =   {'Eps_Eta_M_dom', 'Eps_Eta_Y_H', 'Eps_Eta_M_ext'};
for ii=1:length(ShockList)
    SH          =   ShockList{ii};
    TempData    =   [];
    for jj=1:TempNum
        TempData    =   [TempData,Tables{jj}.(SH)];
    end
    TempTable   =   array2table(TempData,'VariableNames',LabelList,'RowNames',Tables{1}.Row);
    writetable(TempTable,FileName,'WriteRowNames',true,'Sheet',SH);
end